export function getConfig() {
    let txt = localStorage.getItem("systemconfig");
    if (txt) return JSON.parse(txt);
    return {"rootUrl": "http://222.177.24.121:88/"};
    // return {"rootUrl": "http://192.168.11.42:5678/"};

}

export default {Coordinate_range: {x0: 106.5026, y0: 29.6, x1: 106.5070, y1: 29.603}};


export function getUserInfo() {
    let txt = localStorage.getItem("UserInfo");
    if (txt) return JSON.parse(txt);
    return {"isLogin": false, username: "", password: ""};
}

export function saveUserInfo(user) {
    localStorage.setItem("UserInfo", JSON.stringify(user));
}


export function getTokenInfo() {
    let txt = localStorage.getItem("TokenInfo");
    if (txt) return JSON.parse(txt);
    return null;
}

export function saveTokenInfo(tkInfo) {
    localStorage.setItem("TokenInfo", JSON.stringify(tkInfo));
}



